import createAxios from '../utils/axios'

// 订单运费选择项返回
export const getDeliveryList = () => {
    return createAxios({
        url: `/api/get/delivery`,
        method: 'GET',
    }, 'API1',{loading: true});
}
export const upload = (params) => {
    return createAxios({
        url: `/api/base64/upload`,
        method: 'POST',
        data: params,
    }, 'API1',{loading: false});
}

// 热度商品列表
export const getSearchGoodsList = (params: any) => {
    return createAxios({
        url: `/shop/goods?page=${params.page}&page_size=${params.pageSize}&goods=${params.goods}`,
        method: 'GET',
    }, 'API1', {loading: true});
}

// 获取主体商品详情
export const getDetail = (id: number) => {
    return createAxios({
        url: `/shop/goods/detail?id=${id}`,
        method: 'GET',
    },'API1',{loading:true});
}